<?php e($javascript->codeBlock('$(document).ready(function() {$("#EventTypeAddForm").ajaxForm(function() {$(".content").load("/admin/events");});});'));?>

<div id="event">
	<?php e($form->create('EventType', array('url'=>'/admin/events/addtype')));?>
		<fieldset id="event-add">
			<legend>Add a new event type</legend>
			<?php e($form->input('name'));?>
		</fieldset>
		
		<?php e($form->submit('Submit Event Type', array('class'=>'add')));?> <?php e($html->link('Cancel', '/admin/events', array('class'=>'cancel')));?>
	<?php e($form->end());?>
</div>

<div id="existing-types">
	<ul>
	<?php foreach ($exiting_types as $et) : ?>
		<li><?php e($et['EventType']['name']);?></li>
	<?php endforeach;?>
	</ul>
</div>